home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 050 / turbwndo.pas < prev    next >
Pascal/Delphi Source File  |  1985-05-02  |  2KB  |  74 lines

  1. Program News;
  2.  
  3. TYPE
  4.     Titles   = string[79];
  5.  
  6. VAR
  7.     m,x       : integer;
  8.  
  9. PROCEDURE Border (x1,y1,x2,y2,Fgnd,Bkgnd:Integer; Title: Titles);
  10. BEGIN
  11.   Window (x1,y1,x2,y1+1);
  12.   Textbackground(Bkgnd);
  13.   Gotoxy(1,1);
  14.   x := x2-x1;
  15.   Write('╔');
  16.   Textcolor(Fgnd);
  17.   IF length(title) > x THEN title[0] := chr(x-4);
  18.   Write(title);
  19.   FOR m := x1 + length(title)+1 to x2-1 DO Write('═');
  20.   Write('╗');
  21.   FOR m := 2 to y2-y1 DO
  22.     BEGIN
  23.       Window(x1,y1,x2,y1+m+1);
  24.       Gotoxy(1,m);
  25.       Write ('║');
  26.       Gotoxy(x2-x1+1,m);
  27.       Write ('║');
  28.     END;
  29.   Window(x1,y1,x2,y2+1);
  30.   Gotoxy(1,y2-y1+1);
  31.   Write('╚');
  32.   FOR m := x1+1 to x2-1 DO Write('═');
  33.   Write('╝');
  34. END;
  35. {==============================================}
  36. PROCEDURE Box (x1,y1,x2,y2,Fgnd,Bkgnd:integer; title: Titles);
  37. BEGIN
  38.   Border(x1,y1,x2,y2,Fgnd,Bkgnd,title);
  39.   Window(x1+1,y1+1,x2-1,y2-1);
  40.   Clrscr;
  41. END;
  42. {================================================}
  43. BEGIN
  44. Textcolor(red);
  45. Box (4,1,66,5,red,cyan,'Box 1');
  46. Gotoxy(1,2);
  47. Write('Would you like to put windows in your TURBO PASCAL programs?');
  48. Textcolor(green);
  49. Delay(2000);
  50. Box (1,8,25,14,green,blue,'Box 2');
  51. Gotoxy(3,3);
  52. Write ('It is quite simple.');
  53. Delay(2000);
  54. Box (26,8,79,14,yellow,green,'Box 3');
  55. Gotoxy(3,3);
  56. Write('All you have to do is list this program.');
  57. Delay(2000);
  58. Textcolor(red);
  59. Box (1,15,79,24,red,yellow,'Box 4');
  60. Gotoxy(1,4);
  61. Write('The subroutine that generates these windows can be copied into your program.');
  62. Delay(3500);
  63. Textcolor(yellow);
  64. Box (10,10,70,15,yellow,black,'** LAST BOX **');
  65. Write('       That is all there is to it!!');
  66. Gotoxy(1,3);
  67. Delay(1000);
  68. Textcolor(white);
  69. Writeln;
  70. Write('      Courtesy of J. Levitt, Fargo IBM-PC Users');
  71. END.
  72.  
  73.  
  74.